RichLink support darkmode #3663
Workflow file for this run
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: DCR PR deployment | |
on: | |
pull_request: | |
types: [labeled] | |
paths-ignore: | |
- 'apps-rendering/**' | |
jobs: | |
pr_deployment: | |
# We only want to run the app if the PR Deployment label has been added | |
if: ${{ github.event.label.id == 2500798832 }} | |
name: Start server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- run: corepack enable | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
cache: 'yarn' | |
# Make sure we install dependencies in the root directory | |
- run: yarn install --frozen-lockfile | |
- run: make build | |
working-directory: dotcom-rendering | |
- name: Boot server and run ngrok | |
run: | | |
npm install -g ngrok | |
NODE_ENV=production DISABLE_LOGGING_AND_METRICS=true node dotcom-rendering/dist/server.js & | |
timeout 5h ngrok http 9000 -log=stdout | \ | |
grep --line-buffered -o 'https://.*' | \ | |
xargs -L1 -I{} -t \ | |
curl -X POST -H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} -d "{\"state\":\"success\", \"target_url\":\"{}\", \"context\":\"PR deployment\", \"description\":\"This PR is now live until `date -d "+5 hour" "+%a %H:%M"`. Click details to access it ->\"}" |