Skip to content

Commit

Permalink
Merge pull request #42 from glossarist/41-migrate-to-github-pages
Browse files Browse the repository at this point in the history
Update deploy github action
  • Loading branch information
kwkwan authored Aug 16, 2023
2 parents 98ef094 + 1a009be commit 1769e5a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 123 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: build_deploy

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
repository_dispatch:
types: [ deploy_main ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
name: Build site
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Use Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- uses: actions/checkout@v3
- name: Install NPM dependencies
run: |
yarn install
- name: Build site
run: |
yarn build -d
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
50 changes: 0 additions & 50 deletions .github/workflows/deploy-master.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/deploy-staging.yml

This file was deleted.

0 comments on commit 1769e5a

Please sign in to comment.