Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli authored Jan 12, 2024
1 parent 0c6a557 commit 6a3107d
Showing 1 changed file with 1 addition and 127 deletions.
128 changes: 1 addition & 127 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,9 @@ jobs:
- name: Test
run: npm run test

installDocs:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Install (Docs)
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [19]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache node_modules (Docs)
uses: actions/cache@v3
id: cache
with:
path: docs/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
- name: Install Dependencies (Docs)
if: steps.cache.outputs.cache-hit != 'true'
run: cd docs && npm ci

semantic-version:
name: Semantic Release
needs: [installPlayground, installDocs]
needs: installPlayground
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -86,103 +60,3 @@ jobs:
run: |
rsync -r --exclude ./lib ./lib/* .
npx -p pinst -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/github semantic-release --provider=github
build-example:
name: Build (Example)
needs: semantic-version
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [19]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache node_modules
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
~/.cache/ms-playwright/
~\AppData\Local\ms-playwright\
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
- name: Build
run: |
npm run generate --build-analyze --base=/example/ --website-host=https://nuxt-custom-elements.grabarzundpartner.dev
mkdir dist/nuxt-custom-elements/reports
cp -R .reports/* dist/nuxt-custom-elements/reports/
touch dist/nuxt-custom-elements/.nojekyll
env:
DIST_PATH: dist
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: exampleArtifact
path: dist/nuxt-custom-elements

build-docs:
name: Build (Docs)
needs: semantic-version
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [19]

steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: cache docs/node_modules
uses: actions/cache@v3
id: cacheDocs
with:
path: docs/node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
- name: Build
run: |
cd ./docs
npm run generate
touch .output/public/.nojekyll
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIST_PATH: dist
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: docsArtifact
path: docs/.output/public

deploy-ghpages:
name: Deploy (GH-Pages)
needs: [build-example, build-docs]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [19]
steps:
- name: Download Artifact (Docs)
uses: actions/download-artifact@master
with:
name: docsArtifact
path: public/docs
- name: Download Artifact (Example)
uses: actions/download-artifact@master
with:
name: exampleArtifact
path: public/docs/example
- name: Deploy to GH-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public

0 comments on commit 6a3107d

Please sign in to comment.