Added Github actions to deploy to pages

main
Guus van Meerveld 3 years ago
parent 9c1a95e3ff
commit d76d5888e5
Signed by: Guusvanmeerveld
GPG Key ID: 2BA7D7912771966E

@ -1,47 +0,0 @@
name: deploy
on:
push:
branches:
- master
jobs:
typescript:
runs-on: ubuntu-latest
steps:
- name: Setup checkout
uses: actions/checkout@v2
- name: Setup NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: yarn install
- name: Check for syntax errors
run: yarn test-build
- name: ESlint check
run: yarn lint
### Uncomment this if you want Docker hub integration
# docker:
# runs-on: ubuntu-latest
# needs: typescript
# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Build Dockerfile and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# # Replace this with your Docker hub tag and repository name.
# tags: user/repo:latest
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}

@ -0,0 +1,31 @@
name: Deploy to Github Pages
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "16.6.0"
- name: Install npm dependencies
run: yarn install
- name: Build website
run: yarn run export
env:
NODE_ENV: production
- name: Deploy to pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Loading…
Cancel
Save