Upgrade Dependencies to latest version #119
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 Staging | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
name: Publish Website to Staging Server | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
tools: composer | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn dependencies | |
uses: actions/cache@v1 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
${{ runner.os }}-yarn- | |
- name: Install yarn dependencies | |
# as we allow any keys we have to run the installer anyway | |
# if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: Get composer cache directory | |
id: composer-cache-dir | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
id: composer-cache | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
# as we allow any keys we have to run the installer anyway | |
# see: https://help.github.com/en/actions/configuring-and-managing-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key | |
# if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress | |
- name: Run Build | |
run: yarn run gh-pages | |
- name: Upload Build | |
uses: JamesIves/github-pages-deploy-action@4.0.0 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: ./build_gh-pages/ # The folder the action should deploy. | |
- name: Start LightHouse Check | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.PERSONAL_REPO_ACCESS_TOKEN }} | |
repository: genietim/genieblog.ch | |
event-type: stage-uploaded-event |