Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit bdfd12f

Browse files
author
Leandro Alves
authored
Merge pull request #239 from vespa-engine/leandro/shut-down-ui
Attempt fixing permission to vespa-engine/cord-19.git denied to githu…
2 parents c00028f + 515384b commit bdfd12f

1 file changed

Lines changed: 35 additions & 26 deletions

File tree

.github/workflows/deploy-ui.yaml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: CORD-19 UI
2+
3+
permissions:
4+
contents: write
5+
26
on:
37
push:
48
branches: [ master ]
@@ -53,30 +57,35 @@ jobs:
5357
if: github.event_name == 'push'
5458
needs: build
5559
runs-on: ubuntu-latest
56-
env:
57-
DEPLOY_TOKEN: ${{ secrets.CORD_19_DEPLOY }}
5860
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

Comments
 (0)