Skip to content

Commit a8dbd68

Browse files
Run website job for nightlies too
1 parent 555088f commit a8dbd68

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

.github/scripts/update-website.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
git config --global user.name "gh-actions"
5+
git config --global user.email "[email protected]"
6+
7+
cd website
8+
yarn install
9+
yarn build
10+
yarn deploy

.github/workflows/ci.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,28 @@ jobs:
298298
PGP_SECRET: ${{ secrets.PGP_SECRET }}
299299
GPG_EMAIL: ${{ secrets.GPG_EMAIL }}
300300

301-
website:
301+
website-nightly:
302+
needs: publish
303+
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v')
304+
runs-on: ubuntu-latest
305+
steps:
306+
- uses: actions/checkout@v2
307+
with:
308+
fetch-depth: 0
309+
submodules: true
310+
- uses: actions/[email protected]
311+
with:
312+
node-version: '12.x'
313+
- run: .github/scripts/update-website.sh
314+
env:
315+
GIT_USER: VirtuslabRnD
316+
DEPLOYMENT_BRANCH: gh-pages
317+
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
318+
319+
# same as website-nightly above, but for the 'needs' and 'if' fields
320+
website-release:
302321
needs: [publish, update-packages]
303-
if: github.event_name == 'push'
322+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
304323
runs-on: ubuntu-latest
305324
steps:
306325
- uses: actions/checkout@v2
@@ -310,13 +329,7 @@ jobs:
310329
- uses: actions/[email protected]
311330
with:
312331
node-version: '12.x'
313-
- run: |
314-
git config --global user.name "gh-actions"
315-
git config --global user.email "[email protected]"
316-
cd website
317-
yarn install
318-
yarn build
319-
yarn deploy
332+
- run: .github/scripts/update-website.sh
320333
env:
321334
GIT_USER: VirtuslabRnD
322335
DEPLOYMENT_BRANCH: gh-pages

0 commit comments

Comments
 (0)