-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GitHub Actions instead of Netlify (#2462)
- Loading branch information
1 parent
6aa14e8
commit 9999981
Showing
8 changed files
with
223 additions
and
199 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,4 +1,4 @@ | ||
# Copyright (c) 2021-2023 Jonah Aragon <[email protected]> | ||
# Copyright (c) 2024 Jonah Aragon <[email protected]> | ||
|
||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to | ||
|
@@ -18,47 +18,33 @@ | |
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
|
||
name: 📦 Releases | ||
name: Build Offline Website | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_call: | ||
|
||
jobs: | ||
production: | ||
name: Push release to production | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: actions-ssh | ||
permissions: | ||
contents: write | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: '0' | ||
ssh-key: ${{ secrets.ACTIONS_SSH_KEY }} | ||
submodules: 'true' | ||
|
||
- name: Push to production branch | ||
run: | | ||
git push origin HEAD:production | ||
build: | ||
name: Create release packages | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: actions-ssh | ||
persist-credentials: 'false' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
fetch-depth: '0' | ||
ssh-key: ${{ secrets.ACTIONS_SSH_KEY }} | ||
submodules: 'true' | ||
pattern: repo-* | ||
path: modules | ||
|
||
- run: | | ||
rmdir modules/mkdocs-material | ||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material | ||
rmdir theme/assets/brand | ||
mv modules/repo-brand theme/assets/brand | ||
- name: Python setup | ||
uses: actions/setup-python@v5 | ||
|
@@ -82,14 +68,16 @@ jobs: | |
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARDS: false | ||
CONTEXT: deploy-preview | ||
NETLIFY: true | ||
run: | | ||
pipenv run mkdocs build --config-file config/mkdocs-offline.yml | ||
pipenv run mkdocs --version | ||
- name: Package website | ||
run: | | ||
tar -czvf offline.tar.gz site | ||
zip -r -q offline.zip site | ||
- name: Package website | ||
run: | | ||
tar -czvf offline.tar.gz site | ||
zip -r -q offline.zip site | ||
- name: Upload tar.gz file | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -114,32 +102,5 @@ jobs: | |
- name: Upload ZIM file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: privacy_guides.zim | ||
path: privacy_guides.zim | ||
|
||
release: | ||
name: Create release notes | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: offline.tar.gz | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: offline.zip | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: privacy_guides.zim | ||
|
||
- name: Create release notes | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
generateReleaseNotes: true | ||
token: ${{ secrets.REPO_TOKEN }} | ||
artifacts: "offline.zip,offline.tar.gz,privacy_guides.zim" | ||
name: offline-privacy_guides.zim | ||
path: offline-privacy_guides.zim |
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
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
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
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
Oops, something went wrong.