-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: deploy demo to github pages with github action
- Loading branch information
1 parent
f47b3c4
commit 4a9ad4e
Showing
1 changed file
with
40 additions
and
0 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,40 @@ | ||
name: update-demo-daily | ||
on: | ||
schedule: | ||
- cron: "0 6 * * *" | ||
push: | ||
tags: | ||
- "refresh-github-page" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: prepare-page | ||
env: | ||
FEEDS: ${{vars.FEEDS}} | ||
run: | | ||
wget -q -O tinyfeed https://github.com/TheBigRoomXXL/tinyfeed/releases/latest/download/tinyfeed_linux_arm64 | ||
chmod +x tinyfeed | ||
mkdir wwww | ||
echo $FEEDS | ./tinyfeed -o www/index.html | ||
cp www/index.html www/404.html | ||
- name: upload-page | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: www/ | ||
|
||
deploy: | ||
needs: build | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: deploy-to-github-pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |