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

Bump GitHub Actions #260

Merged
merged 9 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
5 changes: 3 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Regularly update Docker tags and Actions steps
version: 2
updates:
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/.github"
- package-ecosystem: "github-actions"
directory: "/.github"
schedule:
interval: "monthly"
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JupyterBook Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _build
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
key: jupyterbook-20230707
key: jupyterbook-20240517

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -52,14 +52,14 @@ jobs:

- name: Save Build
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build
path: _build/

- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ concurrency:

jobs:
preview:
env:
PREVIEW_URL: https://{{repository.owner}}-{{repository.name}}-{{job.name}}-pr-{{pr.number}}.surge.sh
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JupyterBook Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: _build
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
key: jupyterbook-20230707
key: jupyterbook-20240517

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -41,24 +43,13 @@ jobs:
run: |
if (test -a _build/html/reports/*log); then cat _build/html/reports/*log ; fi

- name: Publish to Surge
id: preview_step
uses: afc163/surge-preview@v1
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: _build/html
build: |
npm install surge
- name: Install Surge.sh
uses: actions/setup-node@v4

- name: Format preview url
id: format_url
run: |
echo "url_text=:rocket: Preview deployed at https://${{ steps.preview_step.outputs.preview_url }}" >> $GITHUB_OUTPUT
- run: npm install -g surge

- name: Get the preview_url
run: echo "${{ steps.format_url.outputs.url_text }}"
- run: surge ./_build/html {{env.PREVIEW_URL}} --token ${{ secrets.SURGE_TOKEN }}
lsetiawan marked this conversation as resolved.
Show resolved Hide resolved

- name: Generate summary
- name: Add URL to Summary
run: |
echo "#### ${{ steps.format_url.outputs.url_text }}" >> $GITHUB_STEP_SUMMARY
echo "#### :rocket: Preview deployed at {{env.PREVIEW_URL}}" >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/qaqc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
shell: bash -el {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
Expand Down
Loading