Skip to content

Update release.yml

Update release.yml #15

Workflow file for this run

name: Build and publish release - private fork
on:
push:
branches:
- 'experiment-private-fork'
- 'master'
# Allows you to run this workflow manually
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
actions: read
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Set env to beta
if: contains(github.ref, '-beta.') || contains(github.ref, '-rc.')
run: |
echo "REACT_APP_NAME=Pybricks Beta" >> $GITHUB_ENV
echo "REACT_APP_SUFFIX=-beta" >> $GITHUB_ENV
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Checkout repository
uses: actions/checkout@v4
#!! - run: yarn install
# - run: yarn coverage
#- uses: codecov/codecov-action@v3
# with:
# directory: coverage
- name: Configure Pages
uses: actions/configure-pages@v5
#!! - name: Build
#!! run: yarn build
- name: mock build
shell: bash
run: |
mkdir build && cp README.md build/
# - name: Install lftp
# run: sudo apt-get update && sudo apt-get install --yes lftp
# - name: Publish
# shell: bash
# env:
# LFTP_USER: ${{ secrets.lftpUser }}
# LFTP_PASSWORD: ${{ secrets.lftpPassword }}
# LFTP_SITE: ${{ secrets.lftpSite }}
# run: |
# lftp -e "open --user $LFTP_USER --env-password $LFTP_SITE && mirror --verbose --reverse --delete --exclude=.htaccess --exclude=.well-known build beta; exit"
#- name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# path: 'build/'
# name: 'github-pages'
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v2
with:
path: build/
name: github-pages
# deploy:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# pages: write
# id-token: write
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# # url: 'https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/'
# steps:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
#- name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: 'github-pages'
- name: Deploy
uses: actions/deploy-pages@v4
id: deployment