-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Generic workflow to deploy to scalingo, given arguments" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
pull_request_id: | ||
type: number | ||
required: true | ||
run_number: | ||
type: string | ||
required: true | ||
secrets: | ||
SCALINGO_API_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
deploy: | ||
name: "Deploy to review app pr${{ inputs.pull_request_id }}" | ||
runs-on: ubuntu-latest | ||
environment: review-app | ||
concurrency: | ||
group: deploy-to-scalingo-pr${{ inputs.pull_request_id }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
cache: "pnpm" | ||
- name: Install scalingo CLI | ||
run: | | ||
wget -qO- https://cli-dl.scalingo.com/install.sh | bash | ||
echo "$HOME/bin" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build front | ||
run: NODE_OPTIONS=--max-old-space-size=4096 pnpm front build-scalingo | ||
- name: Build back | ||
run: pnpm back build | ||
- name: Login to scalingo | ||
run: scalingo login --api-token ${{ secrets.SCALINGO_API_TOKEN }} | ||
- name: Deploy back | ||
run: scalingo --app if-dev-back-pr${{ inputs.pull_request_id }} deploy back/back-build.tar.gz ${{ inputs.pull_request_id }}-${{ inputs.run_number }} | ||
- name: Deploy front | ||
run: scalingo --app if-dev-front-pr${{ inputs.pull_request_id }} deploy front/front-build.tar.gz ${{ inputs.pull_request_id }}-${{ inputs.run_number }} | ||
- name: Run DB seed | ||
run: scalingo --app if-dev-back-pr${{ inputs.pull_request_id }} run pnpm db:seed |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
name: "Fullcheck of the project + integration tests" | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Review app" | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validation: | ||
uses: ./.github/workflows/fullcheck.yml | ||
|
||
deploy-review-app: | ||
uses: ./.github/workflows/deploy-to-scalingo-review-app.yml | ||
# needs: validation | ||
with: | ||
pull_request_id: ${{ github.event.number }} | ||
run_number: ${{ github.run_number }} | ||
secrets: | ||
SCALINGO_API_TOKEN: ${{ secrets.SCALINGO_API_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ public/dsfr/ | |
.git/ | ||
.idea/ | ||
.angular/ | ||
back/transpile-back-and-prepare-for-prod.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
transpile-back-and-prepare-for-prod.js |
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