Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #309 from navikt/UpdateGithubWorkflows
Browse files Browse the repository at this point in the history
Update github workflows
  • Loading branch information
dragutin-nav authored Oct 21, 2022
2 parents 0021819 + 88c194b commit 7c13f64
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 180 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/build-deploy-feature-branch-q1.yaml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/deploy-dev-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy to dev
on:
workflow_dispatch:
env:
CI: true
TZ: Europe/Amsterdam

jobs:
deploy-dev:
name: Deploy application to dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Build application
run: npm run build
env:
PUBLIC_URL: https://veilarbmaofs.dev.intern.nav.no
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCS_SA_KEY_DEV }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Upload files to GCS
run: gsutil -m rsync -r build gs://veilarbmaofs-dev
44 changes: 44 additions & 0 deletions .github/workflows/depoloy-prod-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to prod
on:
workflow_dispatch:
push:
branches:
- master
env:
CI: true
TZ: Europe/Amsterdam

jobs:
deploy-prod:
name: Deploy application to prod
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Build application
run: npm run build
env:
PUBLIC_URL: https://veilarbmaofs.intern.nav.no
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCS_SA_KEY_PROD }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Upload files to GCS
run: gsutil -m rsync -r build gs://veilarbmaofs-prod
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Release to prod
target_commitish: master
tag_name: release/prod@${{ github.sha }}
78 changes: 0 additions & 78 deletions .github/workflows/main.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/update-github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy github pages
on:
workflow_dispatch:
jobs:
update-gh-pages:
name: Update GitHub pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build mock application
run: npm run build:mock
- name: Update GitHub pages
uses: softprops/action-gh-release@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
38 changes: 0 additions & 38 deletions nais-dev.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions nais-prod.yaml

This file was deleted.

0 comments on commit 7c13f64

Please sign in to comment.