-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
name: Build tutorials page | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
- push | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
packages: write | ||
|
||
jobs: | ||
|
||
|
||
render-tutorials: | ||
|
||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: build-tutorial | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -107,15 +105,26 @@ jobs: | |
run: clojure notebooks/render_index.clj | ||
|
||
|
||
- name: check git status | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
ls docs/projects | ||
git status | ||
- name: push updated docs | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
|
||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Build with Jekyll | ||
uses: actions/jekyll-build-pages@v1 | ||
with: | ||
source: ./docs | ||
destination: ./_site | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
|
||
deploy-pages: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
# only run github-pages deployemnts on main, not on PRs for example | ||
if: github.ref == 'refs/heads/main' | ||
needs: render-tutorials | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |