HTML not markdown #2791
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: Deploy website | |
on: | |
push: | |
branches: old-site # TODO: change this to master once we're ready to deploy the new site on main | |
pull_request: | |
branches: old-site | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Set up the main website repo | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Don't do a shallow clone | |
# Pull PHP Composer dependencies | |
- name: PHP Composer | |
run: composer install --prefer-dist --no-progress | |
# Compile npm dependencies | |
- name: Set up node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Install npm dependencies | |
run: npm install | |
- name: Compile and copy all CSS and JS assets | |
run: npm run build-prod | |
# Deploy via FTP, only if this is running on a push to master (not a pull request) | |
- name: Sync website files | |
if: github.repository == 'nf-core/website' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/old-site')) | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.ftp_server }} | |
username: ${{ secrets.ftp_username}} | |
password: ${{ secrets.ftp_password }} | |
server-dir: ${{ secrets.ftp_server_old_site_dir }} # Relative, not absolute path | |
protocol: ${{ secrets.ftp_protocol }} | |
port: ${{ secrets.ftp_port }} | |
exclude: | | |
.git* | |
.git*/** | |
**/.git*/** | |
node_modules | |
node_modules/** | |
includes/nf-core/tools/!(R)* | |
includes/nf-core/tools/*/** | |
public_html/tools/docs/*/** |