Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix website deployment #104

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/create-github-app-token@v1
id: app-token
name: Create GitHub App Token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
ref: main
token: ${{secrets.RELEASE_TOKEN}}
token: ${{steps.app-token.outputs.token}}

- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Configure Git author
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'

- name: extract website
uses: actions/download-artifact@v4
Expand All @@ -84,8 +101,6 @@ jobs:

- name: push website
run: |
git config --global user.name "SmallRye CI"
git config --global user.email "[email protected]"
git status
git diff
git add -A .
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/create-github-app-token@v1
id: app-token
name: Create GitHub App Token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
ref: main
token: ${{secrets.RELEASE_TOKEN}}
token: ${{steps.app-token.outputs.token}}

- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Configure Git author
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'

- name: extract website
uses: actions/download-artifact@v4
Expand All @@ -65,8 +82,6 @@ jobs:

- name: push website
run: |
git config --global user.name "SmallRye CI"
git config --global user.email "[email protected]"
git status
git diff
git add -A .
Expand Down