diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 344814a..5c643c1 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,14 +1,21 @@ name: GitHub Pages Publish +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the main branch on: push: branches: [main] pull_request: branches: [main] +# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - prepare: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 @@ -18,26 +25,10 @@ jobs: cp -r fonts/* dist/fonts/ cp -r images/* dist/images/ cp {LICENSE-AGPL,LICENSE-CC-BY-SA-4.0} dist - - name: Upload dist - uses: actions/upload-artifact@v3 - with: - name: dist - path: dist - build: - runs-on: ubuntu-latest - container: - image: docker.io/asciidoctor/docker-asciidoctor:latest - needs: prepare - steps: - - uses: actions/checkout@v3 - - name: Download dist - uses: actions/download-artifact@v3 - with: - name: dist - - run: gem install asciidoctor-multipage - id: adocbuild - name: Build book - run: asciidoctor -a toc=left -o dist/index.html dragonhack.adoc + uses: tonynv/asciidoctor-action@master + with: + program: "asciidoctor -a toc=left -o dist/index.html dragonhack.adoc" - name: Archive artifacts uses: actions/upload-pages-artifact@v1 with: