3636 - name : Test
3737 run : npm run test
3838
39- installDocs :
40- if : " !contains(github.event.head_commit.message, 'skip ci')"
41- name : Install (Docs)
42- runs-on : ${{ matrix.os }}
43-
44- strategy :
45- matrix :
46- os : [ubuntu-latest]
47- node : [19]
48-
49- steps :
50- - uses : actions/setup-node@v3
51- with :
52- node-version : ${{ matrix.node }}
53- - name : Checkout Repo
54- uses : actions/checkout@v3
55- - name : cache node_modules (Docs)
56- uses : actions/cache@v3
57- id : cache
58- with :
59- path : docs/node_modules
60- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
61- - name : Install Dependencies (Docs)
62- if : steps.cache.outputs.cache-hit != 'true'
63- run : cd docs && npm ci
64-
6539 semantic-version :
6640 name : Semantic Release
67- needs : [ installPlayground, installDocs]
41+ needs : installPlayground
6842 runs-on : ${{ matrix.os }}
6943
7044 strategy :
@@ -86,103 +60,3 @@ jobs:
8660 run : |
8761 rsync -r --exclude ./lib ./lib/* .
8862 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
89-
90- build-example :
91- name : Build (Example)
92- needs : semantic-version
93- runs-on : ${{ matrix.os }}
94-
95- strategy :
96- matrix :
97- os : [ubuntu-latest]
98- node : [19]
99-
100- steps :
101- - uses : actions/setup-node@v3
102- with :
103- node-version : ${{ matrix.node }}
104- - name : Checkout Repo
105- uses : actions/checkout@v3
106- - name : cache node_modules
107- uses : actions/cache@v3
108- id : cache
109- with :
110- path : |
111- node_modules
112- ~/.cache/ms-playwright/
113- ~\AppData\Local\ms-playwright\
114- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
115- - name : Build
116- run : |
117- npm run generate --build-analyze --base=/example/ --website-host=https://nuxt-custom-elements.grabarzundpartner.dev
118- mkdir dist/nuxt-custom-elements/reports
119- cp -R .reports/* dist/nuxt-custom-elements/reports/
120- touch dist/nuxt-custom-elements/.nojekyll
121- env :
122- DIST_PATH : dist
123- - name : Archive Production Artifact
124- uses : actions/upload-artifact@master
125- with :
126- name : exampleArtifact
127- path : dist/nuxt-custom-elements
128-
129- build-docs :
130- name : Build (Docs)
131- needs : semantic-version
132- runs-on : ${{ matrix.os }}
133-
134- strategy :
135- matrix :
136- os : [ubuntu-latest]
137- node : [19]
138-
139- steps :
140- - uses : actions/setup-node@v3
141- with :
142- node-version : ${{ matrix.node }}
143- - name : Checkout Repo
144- uses : actions/checkout@v3
145- - name : cache docs/node_modules
146- uses : actions/cache@v3
147- id : cacheDocs
148- with :
149- path : docs/node_modules
150- key : ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/docs/package-lock.json')) }}
151- - name : Build
152- run : |
153- cd ./docs
154- npm run generate
155- touch .output/public/.nojekyll
156- env :
157- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
158- DIST_PATH : dist
159- - name : Archive Production Artifact
160- uses : actions/upload-artifact@master
161- with :
162- name : docsArtifact
163- path : docs/.output/public
164-
165- deploy-ghpages :
166- name : Deploy (GH-Pages)
167- needs : [build-example, build-docs]
168- runs-on : ${{ matrix.os }}
169- strategy :
170- matrix :
171- os : [ubuntu-latest]
172- node : [19]
173- steps :
174- - name : Download Artifact (Docs)
175- uses : actions/download-artifact@master
176- with :
177- name : docsArtifact
178- path : public/docs
179- - name : Download Artifact (Example)
180- uses : actions/download-artifact@master
181- with :
182- name : exampleArtifact
183- path : public/docs/example
184- - name : Deploy to GH-Pages
185- uses : peaceiris/actions-gh-pages@v3
186- with :
187- github_token : ${{ secrets.GITHUB_TOKEN }}
188- publish_dir : public
0 commit comments