|
1 | | -name: Publish Website |
| 1 | +# name: Publish Website |
2 | 2 |
|
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - master |
7 | | - - feature/website |
| 3 | +# on: |
| 4 | +# push: |
| 5 | +# branches: |
| 6 | +# - master |
| 7 | +# - feature/website |
8 | 8 |
|
9 | | -jobs: |
10 | | - build_and_deploy: |
11 | | - runs-on: ubuntu-latest |
12 | | - steps: |
13 | | - - uses: actions/checkout@v2 |
14 | | - |
15 | | - - run: ./install-deps-wasm.sh |
16 | | - working-directory: tunshell-client/build |
17 | | - shell: bash |
18 | | - |
19 | | - - run: ./compile-wasm.sh |
20 | | - working-directory: tunshell-client/build |
21 | | - shell: bash |
22 | | - |
23 | | - - uses: actions/setup-node@v1 |
24 | | - with: |
25 | | - node-version: 22 |
26 | | - |
27 | | - - run: npm ci |
28 | | - working-directory: website |
29 | | - |
30 | | - - run: npm run export |
31 | | - working-directory: website |
32 | | - |
33 | | - - uses: aws-actions/configure-aws-credentials@v1 |
34 | | - with: |
35 | | - aws-access-key-id: ${{ secrets.WEBSITE_AWS_ACCESS_KEY_ID }} |
36 | | - aws-secret-access-key: ${{ secrets.WEBSITE_AWS_SECRET_ACCESS_KEY }} |
37 | | - aws-region: us-east-1 |
38 | | - |
39 | | - - name: Deploy to S3 |
40 | | - run: aws s3 sync --delete --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE out/ s3://tunshell-web/ |
41 | | - working-directory: website |
42 | | - |
43 | | - - name: Deploy to S3 (html) |
44 | | - run: aws s3 cp --recursive --content-type text/html --exclude "*" --include "*.html" --include "go" --include "term" --include "404" --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE out/ s3://tunshell-web/ |
45 | | - working-directory: website |
46 | | - |
47 | | - - name: Deploy to S3 (wasm) |
48 | | - run: aws s3 cp --recursive --content-type application/wasm --exclude "*" --include "*.wasm" --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE services/wasm/ s3://tunshell-web/wasm/ |
49 | | - working-directory: website |
50 | | - |
51 | | - - name: Invalidate CloudFront |
52 | | - run: aws cloudfront create-invalidation --distribution-id=E2BXOYP52RJJQF --paths '/*' |
| 9 | +# jobs: |
| 10 | +# build_and_deploy: |
| 11 | +# runs-on: ubuntu-latest |
| 12 | +# steps: |
| 13 | +# - uses: actions/checkout@v2 |
| 14 | + |
| 15 | +# - run: ./install-deps-wasm.sh |
| 16 | +# working-directory: tunshell-client/build |
| 17 | +# shell: bash |
| 18 | + |
| 19 | +# - run: ./compile-wasm.sh |
| 20 | +# working-directory: tunshell-client/build |
| 21 | +# shell: bash |
| 22 | + |
| 23 | +# - uses: actions/setup-node@v1 |
| 24 | +# with: |
| 25 | +# node-version: 22 |
| 26 | + |
| 27 | +# - run: npm ci |
| 28 | +# working-directory: website |
| 29 | + |
| 30 | +# - run: npm run export |
| 31 | +# working-directory: website |
| 32 | + |
| 33 | +# - uses: aws-actions/configure-aws-credentials@v1 |
| 34 | +# with: |
| 35 | +# aws-access-key-id: ${{ secrets.WEBSITE_AWS_ACCESS_KEY_ID }} |
| 36 | +# aws-secret-access-key: ${{ secrets.WEBSITE_AWS_SECRET_ACCESS_KEY }} |
| 37 | +# aws-region: us-east-1 |
| 38 | + |
| 39 | +# - name: Deploy to S3 |
| 40 | +# run: aws s3 sync --delete --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE out/ s3://tunshell-web/ |
| 41 | +# working-directory: website |
| 42 | + |
| 43 | +# - name: Deploy to S3 (html) |
| 44 | +# run: aws s3 cp --recursive --content-type text/html --exclude "*" --include "*.html" --include "go" --include "term" --include "404" --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE out/ s3://tunshell-web/ |
| 45 | +# working-directory: website |
| 46 | + |
| 47 | +# - name: Deploy to S3 (wasm) |
| 48 | +# run: aws s3 cp --recursive --content-type application/wasm --exclude "*" --include "*.wasm" --acl=public-read --cache-control max-age=7200 --metadata-directive REPLACE services/wasm/ s3://tunshell-web/wasm/ |
| 49 | +# working-directory: website |
| 50 | + |
| 51 | +# - name: Invalidate CloudFront |
| 52 | +# run: aws cloudfront create-invalidation --distribution-id=E2BXOYP52RJJQF --paths '/*' |
0 commit comments