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