From 559ea87b4f4526ab5b91866acaed92d6f140e688 Mon Sep 17 00:00:00 2001 From: Nicholas Thomson Date: Thu, 12 Aug 2021 11:47:56 -0700 Subject: [PATCH 1/2] Add deploy workflow Create a Github action using the "peaceiris/actions-gh-pages" action step to deploy to Github pages Signed-off-by: Nicholas Thomson --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ CNAME | 1 + 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 CNAME diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..49c0395 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy Gatsby + +on: + push: + branches: + - main + +permissions: + contents: write + + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm ci + - run: npm run build + - name: GitHub Pages action + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..9311a88 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +opengitops.dev \ No newline at end of file From 6a9965ab25d012f91b062f121f7402455dbeb2da Mon Sep 17 00:00:00 2001 From: Nicholas Thomson Date: Tue, 24 Aug 2021 15:39:59 -0700 Subject: [PATCH 2/2] Whitespace fixes Signed-off-by: Nicholas Thomson --- .github/workflows/deploy.yml | 3 +-- CNAME | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 CNAME diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 49c0395..f6ce73d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,7 +8,6 @@ on: permissions: contents: write - jobs: deploy: name: Deploy @@ -35,4 +34,4 @@ jobs: if: ${{ github.ref == 'refs/heads/main' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public \ No newline at end of file + publish_dir: ./public diff --git a/CNAME b/CNAME deleted file mode 100644 index 9311a88..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -opengitops.dev \ No newline at end of file