-
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.
chore: update workflows from templates
Signed-off-by: John Molakvoæ <[email protected]>
- Loading branch information
Showing
6 changed files
with
83 additions
and
43 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 |
---|---|---|
|
@@ -9,38 +9,40 @@ on: | |
issue_comment: | ||
types: created | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: none | ||
|
||
# On pull requests and if the comment starts with `/rebase` | ||
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') | ||
|
||
steps: | ||
- name: Add reaction on start | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1 | ||
with: | ||
token: ${{ secrets.COMMAND_BOT_PAT }} | ||
repository: ${{ github.event.repository.full_name }} | ||
comment-id: ${{ github.event.comment.id }} | ||
reaction-type: "+1" | ||
|
||
- name: Checkout the latest code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.COMMAND_BOT_PAT }} | ||
|
||
- name: Fix permissions | ||
run: git config --global --add safe.directory /github/workspace | ||
|
||
- name: Automatic Rebase | ||
uses: cirrus-actions/[email protected] | ||
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} | ||
|
||
- name: Add reaction on failure | ||
uses: peter-evans/create-or-update-comment@v3 | ||
uses: peter-evans/create-or-update-comment@ca08ebd5dc95aa0cd97021e9708fcd6b87138c9b # v3.0.1 | ||
if: failure() | ||
with: | ||
token: ${{ secrets.COMMAND_BOT_PAT }} | ||
|
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 |
---|---|---|
@@ -1,32 +1,33 @@ | ||
name: Docs | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- stable* | ||
|
||
permissions: | ||
contents: write | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
name: Build and deploy | ||
steps: | ||
- name: Check actor permission level | ||
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2 | ||
with: | ||
require: admin | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
|
||
- name: Read package.json node and npm engines version | ||
uses: skjnldsv/[email protected] | ||
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||
id: versions | ||
with: | ||
fallbackNode: '^12' | ||
fallbackNpm: '^6' | ||
fallbackNode: '^16' | ||
fallbackNpm: '^8' | ||
|
||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version: ${{ steps.versions.outputs.nodeVersion }} | ||
|
||
|
@@ -36,10 +37,13 @@ jobs: | |
- name: Install dependencies & build | ||
run: | | ||
npm ci | ||
npm run build --if-present | ||
npm run build:doc --if-present | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
# Only deploy on release | ||
if: github.event.release | ||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 | ||
with: | ||
branch: gh-pages | ||
folder: dist/doc | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist/doc |
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