diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1f526b652..e30c8ae9b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -57,14 +57,22 @@ jobs: restore-keys: | ${{ runner.OS }}-node-${{ env.cache-name }}- ${{ runner.OS }}-node- - - name: "Cache: Gatsby builds" + - name: "Cache: Gatsby .cache/" uses: actions/cache@v1 with: path: .cache - key: ${{ runner.OS }}-rayriffy-h-${{ hashFiles('src/contents/database/codes.js') }} + key: ${{ runner.OS }}-rayriffy-h-cache-${{ hashFiles('src/contents/database/codes.js') }} restore-keys: | - ${{ runner.OS }}-rayriffy-h-${{ hashFiles('src/contents/database/codes.js') }} - ${{ runner.OS }}-rayriffy-h- + ${{ runner.OS }}-rayriffy-h-cache-${{ hashFiles('src/contents/database/codes.js') }} + ${{ runner.OS }}-rayriffy-h-cache- + - name: "Cache: Gatsby public/" + uses: actions/cache@v1 + with: + path: .cache + key: ${{ runner.OS }}-rayriffy-h-public-${{ hashFiles('src/contents/database/codes.js') }} + restore-keys: | + ${{ runner.OS }}-rayriffy-h-public-${{ hashFiles('src/contents/database/codes.js') }} + ${{ runner.OS }}-rayriffy-h-public- - name: 'Init: Install yarn' run: | curl -o- -L https://yarnpkg.com/install.sh | bash diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a780c907a..a330c1c2c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,46 +34,3 @@ jobs: - name: 'Test: Code linting' run: | yarn test:lint - deploy: - needs: test - runs-on: macOS-latest - strategy: - matrix: - node-version: [12.x] - steps: - - uses: actions/checkout@v1 - - name: 'Init: Summon NodeJS' - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: "Cache: node_modules" - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.OS }}-node-${{ env.cache-name }}- - ${{ runner.OS }}-node- - - name: "Cache: Gatsby builds" - uses: actions/cache@v1 - with: - path: .cache - key: ${{ runner.OS }}-rayriffy-h-gatsby-${{ hashFiles('src/contents/database/codes.js') }} - restore-keys: | - ${{ runner.OS }}-rayriffy-h-gatsby-${{ hashFiles('src/contents/database/codes.js') }} - ${{ runner.OS }}-rayriffy-h-gatsby- - - name: 'Init: Install yarn' - run: | - curl -o- -L https://yarnpkg.com/install.sh | bash - - name: 'Init: Install dependencies' - run: | - yarn install - - name: "Build: Trigger build site" - run: | - yarn build - - name: "Deploy: Upload to Netlify" - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - run: | - yarn deploy --message "Automatic deployment from GitHub Actions"