Skip to content

Add htaccess

Add htaccess #23

name: SFTP Deploy
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
container: node:16.17
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependences
uses: actions/setup-node@v3
with:
node-version: 16.17
cache: 'npm'
- run: npm ci
- run: npm run build
- run: cp ./.htaccess ./dist/.htaccess
- name: Deploy to Server
id: deployment
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
with:
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
server: '${{ secrets.SERVER_IP }}'
port: 22
local_path: './dist/*'
remote_path: '/public_html'
delete_remote_files: true
sftp_only: true