Skip to content

Lascaux en anglais (#265) #992

Lascaux en anglais (#265)

Lascaux en anglais (#265) #992

Workflow file for this run

name: Build website
on:
pull_request:
push:
branches:
- master
tags:
- "v*.*.*"
env:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
BUNDLE_WITH: test
steps:
- name: checkout
uses: actions/checkout@v3
with:
lfs: true
- name: run apt-update
# see https://github.com/actions/virtual-environments/issues/675
run: sudo apt-get update
- name: Install libvips
run: |
sudo apt-get install -yqq libvips-tools
- name: Install puppeteer dependencies
run: |
sudo apt-get install -yqq libgconf-2-4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: install nodejs
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
# Dependencies
- name: get npm dependencies
run:
npm ci
# Build
- name: create _deploy.yml config file
run: |
echo "env: production" > _deploy.yml
echo "url: https://holusion.com" >> _deploy.yml
echo "build_id: '$GITHUB_RUN_ID'" >> _deploy.yml
echo "snipcart_api_key: 'MTA0ZmUzN2EtNGFlZS00NjZkLWFiZDktM2RlNzUyODgzMDBhNjM2MTQzNjEyNzYwNDkzMDM2'" >> _deploy.yml
- name: build
run: |
./build.sh
- name: test
# don't test on tags
if: "!startsWith(github.ref, 'refs/tags/v')"
run: |
echo "PATH : $PATH"
./build.sh --no-build -t
./build.sh --no-build -i local -e
# Deploy strategies
- name: deploy preview channel
if: ${{ github.event_name == 'pull_request' }}
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_ACCOUNT_KEY }}"
expires: 30d
projectId: holusion-com
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
- name: deploy built website
if: ${{ github.ref == 'refs/heads/master' }}
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_ACCOUNT_KEY }}"
projectId: holusion-com
channelId: live
- name: deploy to npmjs.org
if: startsWith(github.ref, 'refs/tags/v')
run: |
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}