diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..e28af9d --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(dir \"C:\\\\Users\\\\anton\\\\Desktop\\\\studioVariable\\\\NTB\\\\nouveau-theatre-de-besancon\\\\site\\\\cache\")" + ] + } +} diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index 24fb881..a9da04a 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -4,43 +4,80 @@ on: push: branches: - main + - preprod jobs: deploy: - name: Deploy to Production + name: Deploy runs-on: docker container: image: forgejo-ci-php:latest steps: - name: Checkout code run: | - git clone --depth 1 --branch main https://oauth2:${{ github.token }}@forge.studio-variable.com/${{ github.repository }}.git . + git clone --depth 50 --branch ${{ github.ref_name }} https://oauth2:${{ github.token }}@forge.studio-variable.com/${{ github.repository }}.git . - - name: Install Node.js and build assets - run: | - curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - - apt-get install -y -qq nodejs - npm install - npx gulp - - - name: Install PHP dependencies + - name: Install dependencies run: | composer install --no-dev --optimize-autoloader + - name: Set deploy host + id: host + shell: bash + run: | + if [ "${{ github.ref_name }}" = "preprod" ]; then + echo "ftp_host=${{ secrets.PREPRODUCTION_HOST }}" >> $GITHUB_OUTPUT + else + echo "ftp_host=${{ secrets.PRODUCTION_HOST }}" >> $GITHUB_OUTPUT + fi + - name: Deploy via FTP env: USERNAME: ${{ secrets.USERNAME }} PASSWORD: ${{ secrets.PASSWORD }} - HOST: ${{ secrets.HOST }} + FTP_HOST: ${{ steps.host.outputs.ftp_host }} + shell: bash run: | - apt-get install -y -qq lftp - cat > /tmp/lftp-script.txt < + + template() == 'sectioned'): ?> + + - isHomePage()): ?> + isHomePage() && $site->infoBannerEnabled()->toBool()): ?> diff --git a/site/snippets/nav.php b/site/snippets/nav.php index 94115ed..7cf681e 100644 --- a/site/snippets/nav.php +++ b/site/snippets/nav.php @@ -1,7 +1,7 @@