1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-28 01:23:11 +03:00

Update GitHub pages deployment using deploy-pages action (#1910)

This PR changes two things:

- Deploy the documentation website using the (official) deploy action:
  - https://github.com/actions/deploy-pages
- Check the documentation generation for all the PRs. 

- PR on top of:
  - #1905 
  - #1908   

After merging this PR, we could delete the github-pages branch.
This commit is contained in:
Jonathan Cubides 2023-03-23 15:07:54 +01:00 committed by GitHub
parent 2baab83847
commit dbe9ff61d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,6 +98,7 @@ jobs:
make runtime make runtime
- name: Stack setup - name: Stack setup
id: stack
uses: freckle/stack-action@v4 uses: freckle/stack-action@v4
with: with:
working-directory: main working-directory: main
@ -131,10 +132,10 @@ jobs:
working-directory: smoke working-directory: smoke
- name: Install Smoke - name: Install Smoke
shell: bash
run: | run: |
cd smoke cd smoke
stack install --stack-root ${{ github.workspace }}/.stack stack install --stack-root ${{ steps.stack.outputs.stack-root }}
shell: bash
- name: Smoke testing - name: Smoke testing
id: smoke-linux id: smoke-linux
@ -145,10 +146,15 @@ jobs:
docs-linux: docs-linux:
needs: build-and-test-linux needs: build-and-test-linux
if: >-
github.ref == 'refs/heads/main' || github.event_name ==
'workflow_dispatch'
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# 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
steps: steps:
- name: Checkout our repository - name: Checkout our repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -202,6 +208,7 @@ jobs:
make runtime make runtime
- name: Stack setup - name: Stack setup
id: stack
uses: freckle/stack-action@v4 uses: freckle/stack-action@v4
with: with:
working-directory: main working-directory: main
@ -215,14 +222,26 @@ jobs:
make html-examples make html-examples
make demo-example make demo-example
# TODO: use new action 'pages deploy' - name: Setup Pages
- name: Deploy HTML to github pages uses: actions/configure-pages@v3
uses: peaceiris/actions-gh-pages@v3 if: >-
github.ref == 'refs/heads/main' || github.event_name ==
'workflow_dispatch'
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
if: >-
github.ref == 'refs/heads/main' || github.event_name ==
'workflow_dispatch'
with: with:
github_token: "${{ secrets.GITHUB_TOKEN }}" path: main/book/html
publish_dir: main/book/html
enable_jekyll: false - name: Deploy to GitHub Pages
cname: docs.juvix.org uses: actions/deploy-pages@v1
id: deployment
if: >-
github.ref == 'refs/heads/main' || github.event_name ==
'workflow_dispatch'
build-and-test-macos: build-and-test-macos:
runs-on: macos-12 runs-on: macos-12
@ -269,6 +288,7 @@ jobs:
make CC=$CC LIBTOOL=$LIBTOOL runtime make CC=$CC LIBTOOL=$LIBTOOL runtime
- name: Stack setup - name: Stack setup
id: stack
uses: freckle/stack-action@v4 uses: freckle/stack-action@v4
with: with:
working-directory: main working-directory: main