diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5f59cfd..92eec59 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,11 @@ on: - "README.md" - "TODO.md" - ".github/ISSUE_TEMPLATE/*" + - ".eslintrc.json" + - ".gitignore" + - ".prettierignore" + - ".prettierrc.json" + - ".stylelintrc.json" workflow_dispatch: repository_dispatch: types: [update-word-lists] @@ -39,12 +44,8 @@ jobs: - name: Bump version run: npm version patch - - name: Push - run: | - git push origin main - - name: Install requirements - run: npm install + run: npm ci - name: Print packages run: npm list --depth=0 @@ -55,6 +56,20 @@ jobs: - name: Print packages run: npm list --depth=0 + # This keeps package-lock.json up to date with the deployed game + - name: Commit the word list update if there are changes to commit + run: |- + if git diff --exit-code > /dev/null -- package-lock.json; then + echo "No changes to commit" + else + git add package-lock.json + git commit -m "Update @skedwards88/word_lists" + fi + + - name: Push the version bump and potential word list update + run: | + git push + - name: Build run: npm run build