From 2faa036efe102598a476c81a0dd0bba268b6c16b Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Fri, 30 Sep 2022 11:19:06 -0400 Subject: [PATCH] Update gatsby filesystem setup --- .github/workflows/website-backup.yml | 26 ++++++++++++++++++++++++++ .github/workflows/website.yml | 18 ++++-------------- website/gatsby-config.js | 4 ++-- 3 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/website-backup.yml diff --git a/.github/workflows/website-backup.yml b/.github/workflows/website-backup.yml new file mode 100644 index 00000000..a58f6c1a --- /dev/null +++ b/.github/workflows/website-backup.yml @@ -0,0 +1,26 @@ +name: Website Publish + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install + uses: borales/actions-yarn@v3.0.0 + with: + cmd: --cwd website install # will run `yarn install` command + - name: Build + uses: borales/actions-yarn@v3.0.0 + with: + cmd: --cwd website build # will run `yarn build` command + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.ACCESS_TOKEN }} + publish_dir: ./website/dist \ No newline at end of file diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index a58f6c1a..553b109a 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -9,18 +9,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install - uses: borales/actions-yarn@v3.0.0 + - uses: actions/checkout@v3 + - uses: enriikke/gatsby-gh-pages-action@v2 with: - cmd: --cwd website install # will run `yarn install` command - - name: Build - uses: borales/actions-yarn@v3.0.0 - with: - cmd: --cwd website build # will run `yarn build` command - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.ACCESS_TOKEN }} - publish_dir: ./website/dist \ No newline at end of file + access-token: ${{ secrets.ACCESS_TOKEN }} + working-dir: website \ No newline at end of file diff --git a/website/gatsby-config.js b/website/gatsby-config.js index 29ce61c8..42bddcdb 100644 --- a/website/gatsby-config.js +++ b/website/gatsby-config.js @@ -28,14 +28,14 @@ module.exports = { { resolve: 'gatsby-source-filesystem', options: { - path: `${__dirname}/content`, + path: `${__dirname}/website/content`, name: 'content', }, }, { resolve: 'gatsby-source-filesystem', options: { - path: `${__dirname}/data`, + path: `${__dirname}/website/data`, name: 'data', }, },