Update build workflow to use root node_modules

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2022-03-26 20:50:37 -05:00
parent 5dffffd5a9
commit 6bbec3fac9
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -15,8 +15,6 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: lts/* node-version: lts/*
cache: npm
cache-dependency-path: assets/package-lock.json
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
@ -26,19 +24,17 @@ jobs:
run: | run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/ npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_TOKEN }} npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_TOKEN }}
- name: Install global npm packages - name: Install postcss
run: | run: |
npm install postcss@^8.4.6 postcss-cli@^9.1.0 @fullhuman/postcss-purgecss@^2.0.3 npm -g install postcss-cli
npm -g install postcss@^8.4.6 postcss-cli@^9.1.0 @fullhuman/postcss-purgecss@^2.0.3 - name: Install npm packages
- name: Install local npm packages
run: | run: |
cd assets
npm install npm install
cd ..
- name: Run Hugo - name: Run Hugo
run: | run: |
hugo hugo
- name: Deploy to gh-pages - name: Deploy to gh-pages
if: ${{ !env.ACT }}
uses: rdarida/simple-github-pages-deploy-action@v1 uses: rdarida/simple-github-pages-deploy-action@v1
with: with:
git-user: "MillironX" git-user: "MillironX"