cp: не может stat '~./project_name/*': нет такого файла или каталога
Проект находится на ветке main. Развертывание на gh-страницах ветки из пути: ~./project_name/output при нажатии на main. Система: ubuntu 20.04 до wsl2. Какие пути (параметры) должны быть указаны для команды cp -r для автоматического развертывания на страницах github? Из журнала:
Push
Run run: |
/home/runner/work/_temp/9db87e3f-eb64-4189-a66b-8e958587ada6.sh: line 1: run:: command not found
warning: re-init: ignored --initial-branch=gh-pades
Reinitialized existing Git repository in /home/runner/work/project_name/project_name/.git/
cp: cannot stat '~./project_name/*': No such file or directory
Error: Process completed with exit code 1.
содержимое файла ~./имя_проекта/. гитхаб/рабочие процессы/main.yml:
name: Deploy to GitHub pages
on:
push:
branches:
- main
jobs:
deploy:
environment: production
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "16"
cache: "yarn"
- run: yarn install
- name: Build
run: bin/bridgetown deploy
- name: Push
run: |
run: |
cd output
git config --global user.email "useremail"
git config --global user.name "username"
git init --initial-branch=gh-pades
touch ./.nojekyll
cp -r ~./project_name/* ./
git add -A
git commit -m 'deploy'
git push -f https://username:${{ secrets.GITHUB_TOKEN }}@github.com/username/project_name.git gh-pages
1 ответ
- cp -r ~./project_name/* ./
+ cp -r ~/project_name/* ./
Вместо
~./
, вы, наверное, хотите
~/
чтобы ссылаться на ваш домашний каталог абсолютным образом или
./
чтобы ссылаться на ваш текущий каталог относительным образом.