Skip to content

Commit

Permalink
Merge pull request #102 from akyriako/97-short-live-environments-for-…
Browse files Browse the repository at this point in the history
…pr-reviews

Fix workflows #97
  • Loading branch information
akyriako authored Sep 16, 2024
2 parents 28e421b + 0032791 commit f9e7812
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3

- name: Install and Build
if: github.event.action != 'closed'
env:
REACT_APP_VERSION: env:preview/pr:${{ github.event.pull_request.number }}-${{ github.run_number }}
REACT_APP_VERSION: ${{ vars.APP_VERSION }}.PR${{ github.event.pull_request.number }}-${{ github.run_number }}-${{ steps.commit_hash.outputs.short }}-preview
REACT_APP_DOCS_NEXT_HOST: ${{ vars.DOCS_NEXT_HOST }}
REACT_APP_DOCS_NEXT_ORG: ${{ vars.DOCS_NEXT_ORG }}
REACT_APP_DOCUSAURUS_BASE_URL: ${{ vars.DOCUSAURUS_BASE_URL }}pr-${{ github.event.pull_request.number }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:

- name: Install Dependencies
run: npm install

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3

- name: Build App
env:
Expand Down Expand Up @@ -52,9 +56,6 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3
- uses: docker/setup-buildx-action@v3
- name: Build and Push (Docker Image)
id: docker_build
Expand Down Expand Up @@ -84,6 +85,10 @@ jobs:

- name: Install Dependencies
run: npm install

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3

- name: Build App
env:
Expand Down Expand Up @@ -111,9 +116,6 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v1

- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3
- uses: docker/setup-buildx-action@v3
- name: Build and Push (Docker Image)
id: docker_build
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const config: Config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://' + process.env.REACT_APP_DOCS_NEXT_HOST,
url: 'http://' + process.env.REACT_APP_DOCS_NEXT_HOST,
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: process.env.REACT_APP_DOCUSAURUS_BASE_URL,
Expand Down

0 comments on commit f9e7812

Please sign in to comment.