Vercel/examples #486
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: Publish Templates | ||
on: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
FORCE_COLOR: 3 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
jobs: | ||
publish_template: | ||
name: Publish Template | ||
runs-on: 'self-hosted' | ||
'macos' | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: internal | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v2.2.2 | ||
with: | ||
version: 8.2.0 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16 | ||
cache: pnpm | ||
- name: Install pnpm Dependencies | ||
run: pnpm i --frozen-lockfile --ignore-scripts | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v18.7 | ||
- name: Publish template | ||
run: pnpm update-templates "${{ steps.changed-files.outputs.all_changed_files }}" | ||
env: | ||
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }} | ||
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }} | ||
CONTENTFUL_ENVIRONMENT: ${{ secrets.CONTENTFUL_ENVIRONMENT }} | ||
CONTENTFUL_CONTENT_TYPE: ${{ secrets.CONTENTFUL_CONTENT_TYPE }} | ||
o |