Merge pull request #322 from PagerDuty/release/0.10.1-beta.1 #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PagerDuty Live Continuous Deployment Pipeline (Main) | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
env: | |
CI: false | |
VITE_PD_ENV: ${{ secrets.PD_ENV }} | |
VITE_PD_SUBDOMAIN_ALLOW_LIST: '*' | |
VITE_PD_OAUTH_CLIENT_ID: ${{ secrets.PD_OAUTH_CLIENT_ID }} | |
VITE_PD_OAUTH_CLIENT_SECRET: ${{ secrets.PD_OAUTH_CLIENT_SECRET }} | |
VITE_PD_REQUIRED_ABILITY: ${{ secrets.PD_REQUIRED_ABILITY }} | |
VITE_DD_APPLICATION_ID: ${{ secrets.DD_APPLICATION_ID }} | |
VITE_DD_CLIENT_TOKEN: ${{ secrets.DD_CLIENT_TOKEN }} | |
VITE_DD_SITE: ${{ secrets.DD_SITE }} | |
VITE_DD_SAMPLE_RATE: ${{ secrets.DD_SAMPLE_RATE }} | |
VITE_DD_TRACK_INTERACTIONS: ${{ secrets.DD_TRACK_INTERACTIONS }} | |
VITE_DD_DEFAULT_PRIVACY_LEVEL: ${{ secrets.DD_DEFAULT_PRIVACY_LEVEL }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .tool-versions | |
- name: Install Yarn | |
run: npm install -g yarn | |
# https://github.com/actions/cache/blob/main/examples.md#node---yarn | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install project dependencies (via cache) | |
run: yarn --prefer-offline | |
- name: Build application bundle | |
run: yarn build | |
- name: Deploy | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
sync-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Merge main -> develop | |
uses: devmasx/merge-branch@master | |
with: | |
type: now | |
from_branch: main | |
target_branch: develop | |
github_token: ${{ secrets.GITHUB_TOKEN }} |