Add cache to git #2
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: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_and_deploy_next_ssg: | |
name: Build and Deploy Next site to Wasmer Edge | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Wasmer | |
uses: wasmerio/setup-wasmer@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: mbstring, intl | |
tools: composer | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --prefer-dist | |
# - name: Build the website | |
# run: pnpm edge:build | |
# - name: Deploy app to Wasmer Edge | |
# run: wasmer deploy --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} --publish-package --non-interactive --no-wait --no-persist-id --owner wasmer-examples |