github.com/gohugoio/hugo@v0.88.1/commands/nodeploy.go (about) 1 // Copyright 2019 The Hugo Authors. All rights reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // http://www.apache.org/licenses/LICENSE-2.0 7 // 8 // Unless required by applicable law or agreed to in writing, software 9 // distributed under the License is distributed on an "AS IS" BASIS, 10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // See the License for the specific language governing permissions and 12 // limitations under the License. 13 14 // +build nodeploy 15 16 package commands 17 18 import ( 19 "errors" 20 21 "github.com/spf13/cobra" 22 ) 23 24 var _ cmder = (*deployCmd)(nil) 25 26 // deployCmd supports deploying sites to Cloud providers. 27 type deployCmd struct { 28 *baseBuilderCmd 29 } 30 31 func (b *commandsBuilder) newDeployCmd() *deployCmd { 32 cc := &deployCmd{} 33 34 cmd := &cobra.Command{ 35 Use: "deploy", 36 Short: "Deploy your site to a Cloud provider.", 37 Long: `Deploy your site to a Cloud provider. 38 39 See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed 40 documentation. 41 `, 42 RunE: func(cmd *cobra.Command, args []string) error { 43 return errors.New("build without HUGO_BUILD_TAGS=nodeploy to use this command") 44 }, 45 } 46 47 cc.baseBuilderCmd = b.newBuilderBasicCmd(cmd) 48 49 return cc 50 }