# deploy to GitHub pages - npm run deploy ps : Add -Content "$env :USERPROFILE\.git -credentials" "https ://$($env :github_access_token) :x -oauth git config -global user.email $env :github_email # configure global git credentials store () - git config -global credential.helper store # generate static files - npm run generate
(runs after repo cloning) install : # switch nodejs version - ps : Install -Product node $env :nodejs_version # Only run on master branch branches : only : - master Github_email : secure : ENCRYPTED_GITHUB_EMAIL travis.yml configuration file in the root of your repository with the following contentsĮnvironment : # Nuxt requires node v12 minimum nodejs_version : '12' # Encrypt sensitive data () github_access_token : secure : ENCRYPTED_GITHUB_ACCESS_TOKEN On the same screen, scroll down to the Environment Variables section and create a new variables named GITHUB_ACCESS_TOKEN and in the value field paste a copy of the GitHub personal access token your created earlier and click the 'Add' button.įinally, create a. travis.yml is present' feature by toggling the switch.
Next, click the cog icon beside your repository name to configure the general settings of the build sever and enable the 'Build only if.
#Npm install git repository url free
To deploy with Travis CI, a free for open source projects build server, sign in via your GitHub account, granting Travis access to view your repositories, and then enable the build server for your repository by toggling the switch next to your repositories name in the list displayed. On completion, you'll see your gh-pages branch updated as well as your site. GitHub Packages will match the repository based on the URL, instead of based on the package name. Git commit -m "Adding github pages deploy workflow" git push origin To ensure the repository's URL is correct, replace REPOSITORY with the name of the repository containing the package you want to publish, and OWNER with the name of the user or organization account on GitHub that owns the repository.