mirror of
https://github.com/iconoir-icons/iconoir
synced 2024-06-03 06:22:21 +02:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Website
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: main # We have to checkout main or PNPM fails. Tag should be on main anyway.
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
with:
|
|
version: 7.8.0
|
|
run_install: true
|
|
- name: Build Packages
|
|
run: pnpm run dist
|
|
- name: Build
|
|
run: ./node_modules/.bin/next build
|
|
working-directory: iconoir.com
|
|
- name: Export
|
|
run: ./node_modules/.bin/next export
|
|
working-directory: iconoir.com
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v1
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: './iconoir.com/out'
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v1
|