Skip to content

Commit adb6ab3

Browse files
authored
Add GitHub Action to rebuild and publish website (#149)
1 parent 4d4dced commit adb6ab3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/website.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build and Deploy the Website
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
deploy-website:
9+
runs-on: ubuntu-latest
10+
container: node
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
persist-credentials: false
16+
- run: npx envinfo
17+
- name: Build and Deploy
18+
env:
19+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
REPO: ${{ github.repository }}
21+
USER: gatsby-deploy-bot <support+actions@github.com>
22+
working-directory: ./website
23+
run: |
24+
npm install
25+
npx gatsby build --prefix-paths
26+
npx gh-pages -d public -r https://git:${TOKEN}@github.com/${REPO}.git -u "${USER}"

0 commit comments

Comments
 (0)