feature: save duration #11
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: Deploy PR previews | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Label the PR | |
uses: actions/labeler@v4 | |
- name: Build with Docker | |
run: > | |
docker build | |
--build-arg="NUXT_APP_BASE_URL=/pr-preview/pr-${{ github.event.number }}/" | |
-t tmp . | |
- name: Extract static files | |
run: > | |
docker run --rm --entrypoint /bin/sh -v $(pwd):/mnt | |
tmp -c "cp -r /app/client/ /mnt/client/ && chmod -R 777 /mnt/client/" | |
- name: Updating config.json for not-th.re public | |
run: > | |
echo "{\"baseURL\": \"https://api.not-th.re/\", \"terms\": | |
\"https://scolasti.co/go/privacy\", \"pullRequest\": | |
\"https://github.com/not-three/main/pull/${{ github.event.number }}\"}" > client/config.json | |
- name: Deploy preview | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
preview-branch: html-previews | |
source-dir: ./client | |
custom-url: beta.not-th.re |