From 7eeda92b0230da72e2e02742794886287ecf86f0 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 7 Mar 2023 19:50:48 +0000 Subject: [PATCH 1/6] Test CI --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index b373541..41558ce 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,6 @@ You will need to click the "Populate Database" and "Fetch Data" buttons to get d To kill the npm process do `CTRL + C` in your terminal. To kill the firebase emulators run `fg` to bring the process to the foreground, then do `CTRL + C` -# Committing -Make sure that you exclude the Firebase API key from any commits! - # Links Main site: [irishrailtracker.web.app](https://irishrailtracker.web.app/) From 4860fdd67850a15655b47829a4e20aca6118bc76 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 7 Mar 2023 19:58:41 +0000 Subject: [PATCH 2/6] Update integrate.yml --- .github/workflows/integrate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index 9c23632..a0d690d 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -2,7 +2,7 @@ name: Continuous Integration on: pull_request: - branches: [ master ] + branches: [ main ] jobs: test_pull_request: From f20ebb80746bed54da4a990f9dee0c18daead4d3 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 7 Mar 2023 20:05:51 +0000 Subject: [PATCH 3/6] Update integrate.yml Node --- .github/workflows/integrate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index a0d690d..a5da5d9 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 16 - run: npm ci - run: cd functions && npm ci - run: npm run test From a0943d99b4b2096957b8885b69f0d0330ab7bf96 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 7 Mar 2023 20:20:24 +0000 Subject: [PATCH 4/6] Update CI --- .github/workflows/integrate.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index a5da5d9..2b899e6 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -8,12 +8,20 @@ jobs: test_pull_request: runs-on: ubuntu-latest steps: + - name: Checkout code - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 16 - - run: npm ci - - run: cd functions && npm ci - - run: npm run test - - run: cd .. - - run: npm run build \ No newline at end of file + + - name: Install dependencies + - run: | + npm ci + cd functions && npm ci + + - name: Run tests + run: npm run test + working-directory: ./functions + + - name: Build environment + run: npm run build \ No newline at end of file From 2c52a68ac9a0880bfa31163c55371dc8b0609b42 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Tue, 7 Mar 2023 20:27:28 +0000 Subject: [PATCH 5/6] Update CI YML --- .github/workflows/integrate.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index 2b899e6..eb013a4 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -8,14 +8,13 @@ jobs: test_pull_request: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 16 - name: Install dependencies - - run: | + run: | npm ci cd functions && npm ci From 9de15feca79eef0785b6ed8a8be49176c0c95095 Mon Sep 17 00:00:00 2001 From: Conor McNamara Date: Wed, 8 Mar 2023 15:08:18 +0000 Subject: [PATCH 6/6] Add continuous deployment --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ .gitignore | 3 +-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..dae9e64 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Continuous Deployment + +on: + push: + branches: [ main ] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - uses: actions/setup-node@main + with: + node-version: 12 + + - name: Install dependencies + run: | + npm ci + cd functions && npm ci + + - name: Firebase deploy + run: npm run build && firebase deploy \ No newline at end of file diff --git a/.gitignore b/.gitignore index f923245..4be1cd1 100644 --- a/.gitignore +++ b/.gitignore @@ -63,5 +63,4 @@ node_modules/ .yarn-integrity # dotenv environment variables file -.env -firebase.js \ No newline at end of file +.env \ No newline at end of file