Skip to content

Multi steps

Multi steps #72

Workflow file for this run

name: GitHub Pages Publish
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
prepare:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Move assets to dist
run: |
mkdir -p dist/{fonts,images}
cp -r fonts/* dist/fonts/
cp -r images/* dist/images/
cp {LICENSE-AGPL,LICENSE-CC-BY-SA-4.0} dist
build:
runs-on: ubuntu-latest
container:
image: docker.io/asciidoctor/docker-asciidoctor:latest
needs: prepare
steps:
- id: adocbuild
name: Build book
run: |
gem install asciidoctor-multipage
asciidoctor -a toc=left -o dist/index.html dragonhack.adoc
- name: Archive artifacts
uses: actions/upload-pages-artifact@v1
with:
name: github-pages
path: dist
deploy:
# Add a dependency to the build job
needs: build
# 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 }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this actio