Skip to content

Commit

Permalink
Update test_and_deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
miigotu authored Oct 8, 2023
1 parent 9cd6a1e commit 67a7c34
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,22 @@ jobs:
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
# - name: add wiki push destination
# if: github.ref_name == github.event.repository.default_branch
# run: |
# git remote set-url --add --push origin [email protected]:SickChill/SickChill.WikiTemp.wiki.git
- name: Prettify code
uses: creyD/[email protected]
with:
dry: ${{ github.ref_name != github.event.repository.default_branch }}
push_options: -f
prettier_options: --write **/*.{js,md}
deploy:
name: Deploy to main wiki
name: Deploy to wikis
strategy:
fail-fast: true
continue-on-error: false
needs: prettier
runs-on: ubuntu-22.04
env:
WIKIDIR: ./upstream
if: ${{ github.event.inputs.deploy }}
if: github.ref_name == github.event.repository.default_branch
steps:
- name: Checkout Upstream
uses: actions/checkout@v3
Expand All @@ -68,7 +64,16 @@ jobs:
git fetch wikitemp
git reset --hard wikitemp/${{ github.ref_name }}
working-directory: ${{ env.WIKIDIR }}
- name: Push changes
- name: Push changes to temp wiki
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
repository: SickChill/SickChill.WikiTemp.wiki
force: true
directory: ${{ env.WIKIDIR }}
branch: master
- name: Push changes to main wiki
if: ${{ github.event.inputs.deploy }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SICKCHILL_TOK }}
Expand Down

0 comments on commit 67a7c34

Please sign in to comment.