Skip to content

Commit

Permalink
fix: clone target prior to downloading build
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Feb 17, 2024
1 parent d2d2f96 commit 8b188e7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
type: string
description: path to github project, in format <owner>/<repo>
required: true

ref:
type: string
description: ref to use when cloning the project. default is the head ref of the target repository
Expand All @@ -17,7 +17,7 @@ on:
type: boolean
description: deploy to gh-pages branch for <owner>/<repo> after build
default: true

permissions:
contents: write
pages: write
Expand Down Expand Up @@ -112,6 +112,13 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.deploy-to-pages == 'true' }}
steps:
- name: clone target repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repository }}
ref: gh-pages
token: ${{ secrets.PAT_TOKEN }}

- name: download webgl build
uses: actions/download-artifact@v4
with:
Expand All @@ -130,13 +137,6 @@ jobs:
with:
name: WebGL-Template
path: .

- name: clone target repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repository }}
ref: gh-pages
token: ${{ secrets.PAT_TOKEN }}

- name: get commit hash
id: get-commit
Expand All @@ -154,7 +154,7 @@ jobs:
with:
input: ./index.html
output: ./index.html

- name: commit static site
run: |
git config user.name github-actions
Expand Down

0 comments on commit 8b188e7

Please sign in to comment.