diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..829f1f7 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,30 @@ +name: Build + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + + # Checkout the code + - uses: actions/checkout@v3 + + # Install proper version of node + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + + # Install v3.7.1 of gatsby-cli + - run: npm install -g gatsby-cli@3.7.1 + + # Install project dependencies + - run: npm install + + # Run gatsby build + - run: gatsby build + env: + GATSBY_MAP_GOOGLE_API_KEY: ${{ secrets.GATSBY_MAP_GOOGLE_API_KEY }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a9afcb5..1a6e93a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,7 +6,7 @@ on: - master jobs: - build: + deploy: runs-on: ubuntu-latest steps: @@ -38,4 +38,4 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 20 \ No newline at end of file + timeout-minutes: 20