Remove unused CSS selectors. (#181) #158
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| name: 🔨🚀 Build and deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🚚 Checkout | |
| uses: actions/checkout@v3 | |
| - name: 🐍 Use Python 3.x | |
| uses: actions/setup-python@v3.1.4 | |
| with: | |
| python-version: 3.x | |
| cache: pip | |
| - name: ⏬ Install Python dependencies | |
| run: pip install -r requirements.txt | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: 🐉 Use Node.js 22.14.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22.14.x | |
| cache: "pnpm" | |
| - name: ⏬ Install Node dependencies | |
| run: pnpm install | |
| - name: 🔥 Optimize icon font | |
| run: pnpm minify-icons | |
| - name: 🔨 Build site | |
| run: pnpm build | |
| - name: Setup SSH | |
| run: | | |
| install -m 600 -D /dev/null ~/.ssh/id_rsa | |
| echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_rsa | |
| echo "${{ secrets.DEPLOY_KNOWN_HOSTS }}" > ~/.ssh/known_hosts | |
| - name: Publish Stable | |
| if: ${{ github.ref == 'refs/tags/v*' && !github.event.pull_request.head.repo.fork }} | |
| run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/www/ | |
| - name: Publish Branch | |
| if: ${{ !github.event.pull_request.head.repo.fork }} | |
| run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/ref/${GITHUB_REF##*/} | |
| - name: Publish Commit | |
| run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/ref/${{ github.sha }} |