Post migration warning (#448) #991
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Theme | |
on: | |
pull_request: | |
push: | |
jobs: | |
pre_build: | |
continue-on-error: true | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v4 | |
with: | |
concurrent_skipping: "same_content_newer" | |
paths_ignore: '["CONTRIBUTING.md", "LICENSE", "**/README.md"]' | |
build: | |
needs: pre_build | |
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || needs.pre_build.outputs.should_skip != 'true' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run test:ci | |
- run: npm run zip | |
- run: unzip dist/dawn-advisory-theme.zip -d dist/ | |
- run: rm dist/dawn-advisory-theme.zip | |
- name: Upload build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dawn-advisory-theme-${{ github.sha }} | |
path: dist/ | |
deploy: | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run zip | |
- name: Deploy Ghost theme | |
uses: TryGhost/[email protected] | |
with: | |
api-url: ${{ secrets.GHOST_API_URL }} | |
api-key: ${{ secrets.GHOST_DEPLOY_THEME_ADMIN_API_KEY }} | |
exclude: "dist/* node_modules/*" |