From d42838279e4e41a1fa6bca342b565b23d33202cd Mon Sep 17 00:00:00 2001 From: NicoRedondoo Date: Sun, 30 Jun 2024 16:47:37 +0200 Subject: [PATCH] D01 --- .github/workflows/ci-cd.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 10 ---------- 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci-cd.yaml delete mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml new file mode 100644 index 0000000..9349f68 --- /dev/null +++ b/.github/workflows/ci-cd.yaml @@ -0,0 +1,28 @@ +name: CI / CD +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install + - run: npm start & + - run: npm test + + deploy: + needs: [test] + runs-on: ubuntu-latest + environment: production + steps: + - uses: actions/checkout@v2 + + - id: 'auth' + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY_JSON }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v1' + + - name: 'Use gcloud CLI' + run: 'gcloud info' diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 3faec1a..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: CI -on: [push, pull_request] -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: npm install - - run: npm start & - - run: npm test \ No newline at end of file