|
1 | 1 | name: CORD-19 UI |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: write |
| 5 | + |
2 | 6 | on: |
3 | 7 | push: |
4 | 8 | branches: [ master ] |
@@ -53,30 +57,35 @@ jobs: |
53 | 57 | if: github.event_name == 'push' |
54 | 58 | needs: build |
55 | 59 | runs-on: ubuntu-latest |
56 | | - env: |
57 | | - DEPLOY_TOKEN: ${{ secrets.CORD_19_DEPLOY }} |
58 | 60 | steps: |
59 | | - - name: Fetch artifacts |
60 | | - uses: actions/download-artifact@v4 |
61 | | - with: |
62 | | - name: site-artifacts |
63 | | - path: ../build |
64 | | - - name: Check out code |
65 | | - uses: actions/checkout@v4 |
66 | | - with: |
67 | | - ref: gh-pages |
68 | | - - name: Deploy to gh-pages |
69 | | - run: | |
70 | | - set -ex |
71 | | - shopt -s extglob |
72 | | - cd "${GITHUB_WORKSPACE}" |
73 | | - git config user.name "${GITHUB_ACTOR}" |
74 | | - git config user.email "info@vespa.ai" |
75 | | - rm -rf !("CNAME"|"node_modules") |
76 | | - mv ../build/* . |
77 | | - ls -la |
78 | | - rm -rf ../build |
79 | | - git add . |
80 | | - git commit --allow-empty -m "Publish to gh-pages branch $(date -Is)" |
81 | | - git remote set-url origin "https://x-access-token:${DEPLOY_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" |
82 | | - git push origin gh-pages |
| 61 | + - name: Fetch artifacts |
| 62 | + uses: actions/download-artifact@v4 |
| 63 | + with: |
| 64 | + name: site-artifacts |
| 65 | + path: ../build |
| 66 | + |
| 67 | + - name: Check out gh-pages branch |
| 68 | + uses: actions/checkout@v4 |
| 69 | + with: |
| 70 | + ref: gh-pages |
| 71 | + |
| 72 | + - name: Deploy shutdown page |
| 73 | + run: | |
| 74 | + set -ex |
| 75 | + shopt -s extglob |
| 76 | + cd "${GITHUB_WORKSPACE}" |
| 77 | + git config user.name "${GITHUB_ACTOR}" |
| 78 | + git config user.email "info@vespa.ai" |
| 79 | +
|
| 80 | + # Remove everything except CNAME and .git: |
| 81 | + rm -rf !(CNAME|.git) |
| 82 | +
|
| 83 | + # Move index.html into root: |
| 84 | + mv ../build/index.html . |
| 85 | +
|
| 86 | + # Stage + commit: |
| 87 | + git add --all |
| 88 | + git commit --allow-empty -m "Publish shutdown page $(date -Is)" |
| 89 | +
|
| 90 | + # Push with the built-in GITHUB_TOKEN |
| 91 | + git push origin gh-pages |
0 commit comments