Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the deploy action to re-use the build workflow #130

Merged
merged 8 commits into from
Jun 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 6 additions & 30 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,21 @@
name: deploy

on:
workflow_call:
workflow_dispatch:

jobs:
update:
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
name: Update
uses: FAForever/spooky-db/.github/workflows/update.yaml@master
build:
uses: ./.github/workflows/build.yaml

deploy:
needs: [build]
name: deploy
needs: [update]
runs-on: ubuntu-latest
permissions: write-all
steps:
# https://github.com/actions/checkout/tree/v4/
- name: Checkout spooky db code
uses: actions/checkout@v4
with:
repository: FAForever/spooky-db
ref: master

# https://github.com/actions/setup-node/tree/main
- name: Use Node.js 20.x
uses: actions/setup-node@v4
- uses: actions/download-artifact@v4
with:
cache: npm
node-version: 20.x
name: spookydb-dist
path: dist

# https://github.com/actions/checkout/tree/v4/
- name: Checkout spooky db code
Expand All @@ -58,17 +45,6 @@ jobs:
path: gh-pages
ref: gh-pages

- name: Install
run: |
npm install
npm install bower
npm install grunt-cli
npx bower install

- name: Build
run: |
grunt build

- name: Copy
run: |
# remove old files that have a hash in the name
Expand Down