Skip to content

Commit

Permalink
upd(workflows/deploy.yml): Add comment in issue about staging website…
Browse files Browse the repository at this point in the history
… URL

Many users get confused about /staging command and doesn't know where to expect
website to appear. Fix that, so it will provide info when website got deployed,
where it is deployed and caveats.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
  • Loading branch information
nuclearcat committed Nov 25, 2024
1 parent 2d79bfb commit 6b5004b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
(github.event_name == 'push' && github.ref == 'refs/heads/main')
runs-on: ubuntu-22.04
environment: stagingdeploy
permissions:
issues: write
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
Expand Down Expand Up @@ -91,6 +93,20 @@ jobs:
remote_user: ${{ secrets.WEB_STAGING_USERNAME }}
remote_key: ${{ secrets.WEB_STAGING_KEY }}

- name: Leave comment in issue about staging URL
if: github.event.inputs.environment == 'staging' || github.event_name == 'issue_comment'
run: |
gh issue comment "$NUMBER" --body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
BODY: >
Your PR has been deployed to staging.
Staging URL: https://static.staging.kernelci.org/
After testing, you can merge your PR.
Note: This is a temporary staging URL, if anyone else will test another PR, it will override contents.
- name: rsync production deployment
if: github.event_name == 'push' || github.event.inputs.environment == 'production'
uses: burnett01/rsync-deployments@7.0.1
Expand Down

0 comments on commit 6b5004b

Please sign in to comment.