File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed
Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change 3131 - name : Install the dependencies
3232 run : npm ci
3333 - name : Build
34- run : npm run build
34+ run : npm run build
3535 - name : Upload artifact
3636 uses : actions/upload-pages-artifact@v3
3737 with :
5151 steps :
5252 - name : Deploy to GitHub Pages
5353 id : deployment
54- uses : actions/deploy-pages@v4
54+ uses : actions/deploy-pages@v4
55+
56+ deploy-s3 :
57+ needs : build
58+ # if: github.ref == 'refs/heads/master'
59+ runs-on : ubuntu-latest
60+ steps :
61+ - name : Checkout
62+ uses : actions/checkout@v4
63+
64+ - name : Install s3cmd
65+ run : sudo apt-get update && sudo apt-get install -y s3cmd
66+
67+ - name : Create s3cmd config
68+ run : |
69+ echo "[default]" > /home/runner/.s3cfg
70+ echo "access_key = ${{ secrets.SCW_ACCESS_KEY }}" >> /home/runner/.s3cfg
71+ echo "secret_key = ${{ secrets.SCW_SECRET_KEY }}" >> /home/runner/.s3cfg
72+ echo "host_base = s3.fr-par.scw.cloud" >> /home/runner/.s3cfg
73+ echo "host_bucket = %(bucket)s.s3.fr-par.scw.cloud" >> /home/runner/.s3cfg
74+ echo "use_https = True" >> /home/runner/.s3cfg
75+
76+ - name : Test s3cmd config
77+ run : s3cmd ls
78+
79+ - name : Sync build to S3
80+ run : |
81+ s3cmd sync build/ s3://quantstack-site/ --acl-public --exclude '*.css' --exclude '*.js'
82+ s3cmd sync build/ s3://quantstack-site/ --acl-public \
83+ --mime-type=text/css --exclude '*' --include '*.css'
84+ s3cmd sync build/ s3://quantstack-site/ --acl-public \
85+ --mime-type=application/javascript --exclude '*' --include '*.js'
You can’t perform that action at this time.
0 commit comments