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

Update workflows to use correct environments #1088

Merged
merged 2 commits into from
Mar 26, 2024
Merged
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
16 changes: 11 additions & 5 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'edge' && 'edge' || 'latest' }}
# If a PR into edge, use 'edge'. If a PR into anywhere else, use 'latest'. If a push, use the branch name.
name: ${{ github.event_name == 'pull_request' && (github.base_ref == 'edge' && 'edge' || 'latest') || github.ref_name }}
env:
GOVER: '^1.17'
TUTORIAL_PATH: './docs/content/user-guides/tutorials/'
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
needs: ['build']
runs-on: ubuntu-latest
environment:
# If push to edge, use 'edge'. If push to anywhere else, use 'latest'.
name: ${{ github.ref_name == 'edge' && 'edge' || 'latest' }}
url: ${{ github.ref_name == 'edge' && 'https://edge.docs.radapp.io' || 'https://docs.radapp.io' }}
steps:
Expand Down Expand Up @@ -117,8 +119,10 @@ jobs:
needs: ['build']
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'edge' && 'edge' || 'latest' }}
url: ${{ github.ref_name == 'edge' && 'https://edge.docs.radapp.io' || 'https://docs.radapp.io' }}
# If a PR into edge, use 'edge'. If a PR into anywhere else, use 'latest'. If a push, use the branch name.
name: ${{ github.event_name == 'pull_request' && (github.base_ref == 'edge' && 'edge' || 'latest') || github.ref_name }}
# If a push to edge, use the edge URL. If a push to anywhere else, use the latest URL. If a PR, blank.
url: ${{ github.event_name == 'pull_request' && '' || (github.ref_name == 'edge' && 'https://edge.docs.radapp.io' || 'https://docs.radapp.io') }}
steps:
- name: Download Hugo artifacts
uses: actions/download-artifact@v3
Expand All @@ -142,8 +146,9 @@ jobs:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'edge' && 'edge' || 'latest' }}
url: ${{ github.ref_name == 'edge' && 'https://edge.docs.radapp.io' || 'https://docs.radapp.io' }}
# If a PR into edge, use 'edge'. If a PR into anywhere else, use 'latest'.
name: ${{ github.base_ref == 'edge' && 'edge' || 'latest' }}
url: ${{ github.base_ref == 'edge' && 'https://edge.docs.radapp.io' || 'https://docs.radapp.io' }}
steps:
- name: Close Pull Request
id: closepullrequest
Expand All @@ -159,6 +164,7 @@ jobs:
needs: ['build', 'deploy']
runs-on: ubuntu-latest
environment:
# If push to edge, use 'edge'. If push to anywhere else, use 'latest'.
name: ${{ github.ref_name == 'edge' && 'edge' || 'latest' }}
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_API_APPID }}
Expand Down
Loading