use github pages instead of releases
This commit is contained in:
parent
72983af083
commit
051acebfe5
1 changed files with 44 additions and 7 deletions
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
|
@ -1,6 +1,7 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
@ -11,12 +12,12 @@ on:
|
|||
- LICENSE
|
||||
|
||||
jobs:
|
||||
tagged-release:
|
||||
name: Release
|
||||
build:
|
||||
if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos
|
||||
name: Build skin
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
|
@ -30,7 +31,43 @@ jobs:
|
|||
- name: Build
|
||||
run: python ./src
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
- name: Archive Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
files: POMP.osk
|
||||
name: skin
|
||||
path: POMP.osk
|
||||
|
||||
release:
|
||||
if: ${{ github.repository_owner == 'developomp' }} # prevents workflow from running in forked repos
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout gh-pages
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: gh-pages
|
||||
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
|
||||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: skin
|
||||
path: POMP.osk
|
||||
|
||||
- name: Overwrite file
|
||||
run: mv ./POMP.osk ./index.html
|
||||
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add index.html
|
||||
git commit -m "auto deploy from workflow"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue