Skip to content

Commit

Permalink
Add GitHub Action to rebuild and publish website (nodejs#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlight authored Jul 22, 2020
1 parent 4d4dced commit adb6ab3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Deploy the Website

on:
push:
branches: [ master ]

jobs:
deploy-website:
runs-on: ubuntu-latest
container: node
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- run: npx envinfo
- name: Build and Deploy
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
USER: gatsby-deploy-bot <[email protected]>
working-directory: ./website
run: |
npm install
npx gatsby build --prefix-paths
npx gh-pages -d public -r https://git:${TOKEN}@github.com/${REPO}.git -u "${USER}"

0 comments on commit adb6ab3

Please sign in to comment.