Skip to content

Commit

Permalink
update GitHub actions build and deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
matsev committed Sep 13, 2023
1 parent 0d0ccb7 commit ddf90fb
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

container:
image: asciidoctor/docker-asciidoctor:1.18
image: asciidoctor/docker-asciidoctor:1.54
volumes:
# /documents/ is the default working directory of the docker-asciidoctor container
- ${{ github.workspace }}:/documents/
Expand Down Expand Up @@ -39,10 +39,27 @@ jobs:
- name: Copy artifacts 🚚
run: >
apk add rsync &&
apk add rsync tar &&
rsync -av --exclude=".*" ${{ env.BUILD_PATH }}/ ${{ env.DEPLOY_PATH }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{ env.DEPLOY_PATH }}
- name: Upload artifact 🚚
uses: actions/upload-pages-artifact@v2

deploy:
needs: build
runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit ddf90fb

Please sign in to comment.