-
Notifications
You must be signed in to change notification settings - Fork 0
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
12 changed files
with
102 additions
and
45 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 |
---|---|---|
|
@@ -150,17 +150,38 @@ jobs: | |
path: | | ||
var/dist/**/* | ||
doc: | ||
documentation: | ||
name: Documentation | ||
needs: [ evaluate ] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
|
||
- name: Create temp repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
path: var/doc | ||
|
||
- name: Setup Git | ||
working-directory: var/doc | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Engity Bot" | ||
- name: Prepare temp repository | ||
working-directory: var/doc | ||
run: | | ||
git branch -d temp-deploy || true | ||
git switch --orphan temp-deploy | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -179,18 +200,16 @@ jobs: | |
- name: Build | ||
run: | | ||
mkdocs --color build -c | ||
rm -f var/doc/requirements.txt | ||
- name: Deploy | ||
id: deploy | ||
if: needs.evaluate.outputs.stage-publish == 'true' | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
command: pages deploy --branch=${{ needs.evaluate.outputs.version }} --commit-dirty=true --project-name=bifroest-engity-org var/doc | ||
|
||
- name: Report | ||
if: needs.evaluate.outputs.stage-publish == 'true' | ||
env: | ||
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }} | ||
if: needs.evaluate.outputs.stage-publish == 'true' && needs.evaluate.outputs.pr | ||
working-directory: var/doc | ||
run: | | ||
echo "Documentation is available at ${DEPLOYMENT_URL}" >> "$GITHUB_STEP_SUMMARY" | ||
git add -A | ||
git commit -m "Release PR-${{ needs.evaluate.outputs.pr }}" | ||
git push --delete origin "docs/pr-${{ needs.evaluate.outputs.pr }}" || true | ||
git tag -d "docs/pr-${{ needs.evaluate.outputs.pr }}" || true | ||
git tag -a "docs/pr-${{ needs.evaluate.outputs.pr }}" -m "Release PR-${{ needs.evaluate.outputs.pr }}" | ||
git push origin "docs/pr-${{ needs.evaluate.outputs.pr }}" | ||
echo "Documentation is available at https://bifroest.engity.org/pr-${{ needs.evaluate.outputs.pr }}/" >> "$GITHUB_STEP_SUMMARY" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,13 +61,34 @@ jobs: | |
documentation: | ||
name: "Documentation" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
|
||
- name: Create temp repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
path: var/doc | ||
|
||
- name: Setup Git | ||
working-directory: var/doc | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Engity Bot" | ||
- name: Prepare temp repository | ||
working-directory: var/doc | ||
run: | | ||
git branch -d temp-deploy || true | ||
git switch --orphan temp-deploy | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -83,15 +104,22 @@ jobs: | |
path: ~/.cache/pip | ||
key: ${{ hashFiles('docs/requirements.txt') }} | ||
|
||
- name: Setup Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Engity Bot" | ||
- name: Deploy | ||
- name: Build | ||
run: | | ||
VERSION_INPUT="${{ github.event.inputs.version }}" | ||
VERSION_REF="${{ github.ref }}" | ||
export VERSION=$(test -z "${VERSION_INPUT}" && echo $(echo "${VERSION_REF}" | sed -e "s#^refs/tags/##g" | sed -e "s#^v##g") || echo "${VERSION_INPUT}") | ||
echo "Version: ${VERSION}" | ||
mike deploy --push --update-aliases "${VERSION}" latest | ||
mkdocs --color build -c | ||
rm -f var/doc/requirements.txt | ||
- name: Deploy | ||
working-directory: var/doc | ||
run: | | ||
git add -A | ||
git commit -m "Release v${{ github.event.inputs.version }}" | ||
git push --delete origin "docs/v${{ github.event.inputs.version }}" || true | ||
git tag -d "docs/v${{ github.event.inputs.version }}" || true | ||
git tag -a "docs/v${{ github.event.inputs.version }}" -m "Release v${{ github.event.inputs.version }}" | ||
git push origin "docs/v${{ github.event.inputs.version }}" | ||
echo "Documentation is available at https://bifroest.engity.org/v${{ github.event.inputs.version }}/" >> "$GITHUB_STEP_SUMMARY" |
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
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
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