🚚 update: Increase Service Worker version to v47
#27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy website | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/**" | |
- "src/**" | |
- build.sh | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/**" | |
- "src/**" | |
- build.sh | |
workflow_dispatch: # Allows manual execution of workflow | |
jobs: | |
build-website: | |
if: startsWith(github.ref, 'refs/pull/') | |
runs-on: ubuntu-latest | |
container: "docker://asciidoctor/docker-asciidoctor:latest" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build site using Asciidoctor | |
run: | | |
# Give execution permission to buildscript | |
chmod +x build.sh | |
# Run buildscript | |
./build.sh | |
build-deploy-website: | |
if: startsWith(github.ref, 'refs/heads/') | |
runs-on: ubuntu-latest | |
container: "docker://asciidoctor/docker-asciidoctor:latest" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build site using Asciidoctor | |
run: | | |
# Give execution permission to buildscript | |
chmod +x build.sh | |
# Run buildscript | |
./build.sh | |
- name: Install package for Deploy Action | |
run: | | |
apk update | |
apk add rsync | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: build | |
clean: true |