Skip to content

Commit

Permalink
Merge branch 'web' of https://github.com/sithumonline/json_x into tes…
Browse files Browse the repository at this point in the history
…t/development-web
  • Loading branch information
methminug committed Apr 13, 2024
2 parents 48180d0 + 87cf683 commit 37eb083
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
artifact_link: ${{ steps.generate-artifact-link.outputs.artifact_link }}
sha_short: ${{ steps.generate-artifact-link.outputs.sha_short }}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -45,6 +46,7 @@ jobs:
id: generate-artifact-link
run: |
echo "artifact_link=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}" >> "$GITHUB_OUTPUT"
echo "sha_short=${{ env.SHA_SHORT }}" >> "$GITHUB_OUTPUT"
web-build:
name: Web page build
Expand All @@ -53,28 +55,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Checkout to web branch
uses: actions/checkout@v2
with:
ref: development/web
- name: Compile HTML
run: |
export LINUX_DOWNLOAD_HREF=${{ needs.unstable-linux.outputs.artifact_link }}
export LINUX_DOWNLOAD=json_x_glfw_opengl3-linux-amd64_unstable_${{ env.SHA_SHORT }}
mkdir dist
export LINUX_DOWNLOAD=json_x_glfw_opengl3-linux-amd64_unstable_${{ needs.unstable-linux.outputs.sha_short }}
sed -e "s#linux-download-href#$LINUX_DOWNLOAD_HREF#g" \
-e "s#linux-download#$LINUX_DOWNLOAD#g" \
index.html.tmp > dist/index.html
index.html
- name: Push generated webpage to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: "dist"
source-directory: "."
destination-github-username: "sithumonline"
destination-repository-name: "json_x_preview"
user-email: "github-actions[bot]@users.noreply.github.com"
user-name: "github-actions[bot]"
user-email: "${{ needs.unstable-linux.outputs.sha_short }}+github-actions[bot]@users.noreply.github.com"
user-name: "${{ needs.unstable-linux.outputs.sha_short }}+github-actions[bot]"

0 comments on commit 37eb083

Please sign in to comment.