-
Notifications
You must be signed in to change notification settings - Fork 1
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
5 changed files
with
98 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
name: 'Netlify Preview Deploy' | ||
name: Netlify Preview Deploy | ||
|
||
on: | ||
pull_request: | ||
types: ['opened', 'edited', 'synchronize'] | ||
|
||
concurrency: | ||
group: preview-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
name: 'Deploy' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v4 | ||
fetch-depth: 0 | ||
|
||
- name: Prepare Deploy | ||
uses: ./.github/actions/prepare-deploy | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: npm ci for website | ||
run: npm ci | ||
working-directory: website | ||
- run: npm run build -- --output-hashing=none --base-href=/ | ||
working-directory: website | ||
main-branch-name: develop | ||
app-configuration: preview | ||
|
||
- uses: jsmrcaga/action-netlify-deploy@master | ||
- name: Publish | ||
id: deploy | ||
uses: netlify/actions/cli@master | ||
with: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
args: deploy --dir=deploy --filter=ftu-ui | ||
env: | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
install_command: false | ||
build_command: false | ||
build_directory: website/dist/a2agc | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
|
||
- name: Create Deploy Comment | ||
uses: ./.github/actions/deploy-comment | ||
with: | ||
deploy-url: ${{steps.deploy.outputs.NETLIFY_URL}} |
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,48 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
|
||
concurrency: | ||
group: ci-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
main: | ||
name: Nx Cloud - Main Job | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
number-of-agents: 3 | ||
init-commands: | | ||
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3 | ||
parallel-commands: | | ||
npx nx-cloud record -- npx nx workspace-lint | ||
npx nx-cloud record -- npx nx format:check | ||
parallel-commands-on-agents: | | ||
npx nx affected --target=lint --parallel=3 | ||
npx nx affected --target=test --parallel=3 --ci --code-coverage | ||
npx nx affected --target=test-doc-coverage --parallel=3 | ||
npx nx affected --target=build --parallel=3 | ||
main-branch-name: develop | ||
|
||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
number-of-agents: 3 | ||
|
||
slack-notification: | ||
name: Slack Notification | ||
if: ${{ always() }} | ||
runs-on: ubuntu-latest | ||
needs: main | ||
steps: | ||
- uses: kpritam/slack-job-status-action@v1 | ||
with: | ||
job-status: ${{ needs.main.result }} | ||
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel: github |
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,41 +1,33 @@ | ||
name: 'Production Build' | ||
name: Staging Build | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Tests'] | ||
workflows: ['CI'] | ||
branches: ['main'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
name: 'Deploy' | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v4 | ||
ref: main | ||
fetch-depth: 0 | ||
|
||
- name: Prepare Deploy | ||
uses: ./.github/actions/prepare-deploy | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: npm ci for website | ||
run: npm ci | ||
working-directory: website | ||
- run: npm run build -- --output-hashing=none --base-href=/ | ||
working-directory: website | ||
main-branch-name: main | ||
app-configuration: production | ||
nx-command: run-many | ||
|
||
- uses: peaceiris/actions-gh-pages@v3 | ||
- name: Publish | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: website/dist/a2agc | ||
commit_message: "Production deploy -- ${{ github.event.head_commit.message }}" | ||
publish_dir: deploy | ||
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}' |
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,42 +1,34 @@ | ||
name: 'Staging Build' | ||
name: Staging Build | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Tests'] | ||
workflows: ['CI'] | ||
branches: ['develop'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
name: 'Deploy' | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v4 | ||
ref: develop | ||
fetch-depth: 0 | ||
|
||
- name: Prepare Deploy | ||
uses: ./.github/actions/prepare-deploy | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: npm ci for website | ||
run: npm ci | ||
working-directory: website | ||
- run: npm run build -- --output-hashing=none --base-href=/ | ||
working-directory: website | ||
main-branch-name: develop | ||
app-configuration: staging | ||
nx-command: run-many | ||
|
||
- uses: peaceiris/actions-gh-pages@v3 | ||
- name: Publish | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: website/dist/a2agc | ||
publish_dir: deploy | ||
publish_branch: staging | ||
commit_message: "Staging deploy -- ${{ github.event.head_commit.message }}" | ||
commit_message: 'Staging deploy -- ${{ github.event.head_commit.message }}' |
This file was deleted.
Oops, something went wrong.