Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub pages deployment using deploy-pages action #1910

Merged
merged 24 commits into from
Mar 23, 2023
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 32 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
make runtime

- name: Stack setup
id: stack
uses: freckle/stack-action@v4
with:
working-directory: main
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -202,6 +208,7 @@ jobs:
make runtime

- name: Stack setup
id: stack
uses: freckle/stack-action@v4
with:
working-directory: main
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down