diff options
author | Liran Tal <liran.tal@gmail.com> | 2023-02-02 20:15:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:15:56 +0200 |
commit | 16a9ee38d481bcbabbf3f77e3df0c37e87085b32 (patch) | |
tree | ace38f7e35d22fa9c60d637c8185e1629d70a788 | |
parent | 879fcf94cb0f0fe5f56e6e4e0991f2485d1924f9 (diff) |
build: decouple project ci and docs ci (#229)
-rw-r--r-- | .github/workflows/docs.yml | 26 | ||||
-rw-r--r-- | .github/workflows/main.yml | 28 | ||||
-rw-r--r-- | docs/package.json | 2 |
3 files changed, 30 insertions, 26 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..40d8660 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,26 @@ +name: CI + +on: [push, pull_request] + +jobs: + build_docs: + strategy: + matrix: + platform: [ubuntu-latest] + node: ['14', '16', '18'] + name: Build docs + runs-on: ${{ matrix.platform }} + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: install dependencies + run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts + - name: Gatsby Publish + uses: enriikke/gatsby-gh-pages-action@v2 + with: + access-token: x-access-token:${{ secrets.GITHUB_TOKEN }} + working-dir: docs + deploy-branch: gh-pages diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a4eef7..18ecf7b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +name: Project CI on: [push, pull_request] @@ -7,7 +7,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest] - node: ['14'] + node: ['14', '16', '18'] name: lint runs-on: ${{ matrix.platform }} steps: @@ -20,32 +20,10 @@ jobs: - name: check lint run: yarn lint - build_docs: - strategy: - matrix: - platform: [ubuntu-latest] - node: ['14'] - name: Build docs - runs-on: ${{ matrix.platform }} - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: install dependencies - run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts - - name: Gatsby Publish - uses: enriikke/gatsby-gh-pages-action@v2 - with: - access-token: x-access-token:${{ secrets.GITHUB_TOKEN }} - working-dir: docs - deploy-branch: gh-pages - release: name: Semantic release runs-on: 'ubuntu-latest' - needs: build_docs + needs: lint if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v2 diff --git a/docs/package.json b/docs/package.json index 5915278..61a491d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,7 +10,7 @@ "gatsby-plugin-offline": "^2.0.25", "gatsby-plugin-react-helmet": "^3.0.10", "gatsby-plugin-sass": "^2.0.11", - "node-sass": "^7.0.2", + "node-sass": "^4.11.0", "react": "^16.8.5", "react-dom": "^16.8.5", "react-helmet": "^5.2.0", |