-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 publish site as workflow artifact
- Loading branch information
Showing
2 changed files
with
63 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Checks | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
push: | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.branch }} | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.2 | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Prettier | ||
run: npx prettier -l -u . |
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,19 +1,36 @@ | ||
name: Publish site | ||
name: Publish service | ||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Publish site | ||
run: | | ||
wget https://github.com/tmijs/tmi.js/releases/download/v1.8.5/tmi.min.js -O ./html/overlay/tmi.min.js | ||
mv ./html ./docs | ||
git config user.email git@github.com | ||
git config user.name 'GitHub Actions' | ||
git add . | ||
git commit -m 'Publish site' | ||
git push -f -u origin master:gh-pages | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: | | ||
wget https://github.com/tmijs/tmi.js/releases/download/v1.8.5/tmi.min.js -O ./html/tmi.min.js | ||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: html/ | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v2 |